package xufei.storage.service.impl;

import com.xufei.common.domain.storage.Storage;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import xufei.storage.mapper.StorageMapper;
import xufei.storage.service.StorageService;

@Service
public class StorageServiceImpl implements StorageService {

    private final StorageMapper storageMapper;

    public StorageServiceImpl(StorageMapper storageMapper) {
        this.storageMapper = storageMapper;
    }

    @Override
    @Transactional(rollbackFor = Exception.class)
    public void updateResidue(Storage storage) {
        storageMapper.updateResidue(storage);
    }
}
